import axios from '../utils/axios.js';

export let getCategoryList=()=>{
    return axios.get('/category/list')
}

export let selectArticleList=(cid)=>{
    return axios.get(`/category/select/${cid}`)
}


export let addCategory=(category)=>{
    return axios.post('/category/add',category)
 }

export let editCategory=(category)=>{
    return axios.post('/category/edit',category)
 } 


 export let delCategory=(id)=>{
    return axios.get(`/category/del/${id}`)
 }


 export let getCategoryPage=(queryvo,value)=>{
    let pageNum = queryvo.page
    let pageSize = queryvo.limit
    return axios.post(`/category/page/${pageNum}/${pageSize}`,value)
    // return axios({
    //     url: `/category/queryListPage/${current}/${limit}`,
    //     method: 'get',
    //     data: category
    // })
}

